home *** CD-ROM | disk | FTP | other *** search
- Path: erich.triumf.ca!bennett
- From: bennett@erich.triumf.ca (P.Bennett)
- Newsgroups: comp.lang.c
- Subject: Re: What is wrong with this loop?
- Date: 20 Apr 1996 15:47 PST
- Organization: TRIUMF: Tri-University Meson Facility
- Distribution: world
- Message-ID: <20APR199615472160@erich.triumf.ca>
- References: <4l86la$1t9@uwm.edu> <4l8apa$kv8@spanky.pls.ov.com> <4lb6sj$c5c@abel.cc.sunysb.edu>
- NNTP-Posting-Host: ftp.triumf.ca
- News-Software: VAX/VMS VNEWS 1.50
-
- In article <4lb6sj$c5c@abel.cc.sunysb.edu>, dkat@psych1.psy.sunysb.edu (DK) writes...
- >
- >/* I assume you mean
- > while (cd != 'm' || cd != 'f' || cd != 'o')
- >/*try using gets(line) - it is always safer*/
-
- No - it's always more dangerous - use fgets()
-
- >while(gets(line)!=NULL)
-
- while(fgets(line, sizeof(line), stdin); /* or replace sizeof(line) with the */
- /* actual size */
-
-
- Peter Bennett VE7CEI | Vessels shall be deemed to be in sight
- Internet: bennett@triumf.ca | of one another only when one can be
- Packet: ve7cei@ve7kit.#vanc.bc.ca | observed visually from the other
- TRIUMF, Vancouver, B.C., Canada | ColRegs 3(k)
- GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
- or: ftp://ftp-i2.informatik.rwth-aachen.de/pub/arnd/GPS/peter/index.html
- or: http:://vancouver-webpages.com/peter/index.html
-
-